<template>
    <b>currentIndex</b>: &nbsp;{{ index }}
    <dd-divider></dd-divider>
    <dd-menu @select="select">
        <dd-item>item1</dd-item>
        <dd-item>item2</dd-item>
        <dd-menu label="subMenu">
            <dd-item>subMenu-item1</dd-item>
            <dd-item>subMenu-item2</dd-item>
        </dd-menu>
        <dd-menu>
            <template #label>label</template>
            <dd-item>subMenu-item1</dd-item>
            <dd-item>subMenu-item2</dd-item>
        </dd-menu>
    </dd-menu>
</template>

<script setup lang="ts">
import { ref } from "vue";
const index = ref("");

function select(index_: string) {
    index.value = index_;
}
</script>
